(function($, window, document) {
  
  var ns = jfJQMQRReader;
  
  var nsOnScanSuccessOriginal = ns.onScanSuccess;
  ns.onScanSuccess = function(result) {
    if (result.text) {
      var controller = jfPD.controller;
      if (ns.isUrl(result.text) && jfPD && jfPD.controller && jfPD.controller.isSameDomain(result.text)) {
        jfPD.controller.loadPage(result.text);
        return;
      }
    }

    return nsOnScanSuccessOriginal(result);
  }

})(jQuery, window, document);